package com.cdut.logistics.model.dao.businesses;

import java.util.List;

import com.cdut.logistics.config.Constants;
import com.cdut.logistics.model.entity.Model.Suggestion;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;

/**  
 * @ClassName: s  
 * @Description: TODO(这里用一句话描述这个类的作用)  
 * @author wxt.asus
 * @date 2018年1月26日 上午9:13:48    
 */
public class RemarkDao {
	 public static RemarkDao dao = new RemarkDao();
	 /**
	  * 
	  * @return
	  */
     public List<Suggestion> remark_find()
     {
    	 //
    	 String sql = "select * from suggestion where "+Constants.sql_add;
    	 List<Suggestion> list =Suggestion.dao.find(sql);    	 
    	 return list;
     }
     /**
      * 
      */
     public boolean remark_update(int remark_id)
     {
    	 String sql = "select * from suggestion where id = ? and "+Constants.sql_add;
    	 Suggestion  suggestion  = Suggestion.dao.findFirst(sql,remark_id);
    	 suggestion.set("is_use",0);
    	 boolean is_success = suggestion.update();
    	 return is_success;    	 
     }
}
